package com.fzu.commonutil.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fzu.commonutil.entity.Demand;
import com.fzu.commonutil.entity.Housekeeper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fzu.commonutil.params.SelectResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zyq
 * @since 2023-03-26
 */
public interface HousekeeperMapper extends BaseMapper<Housekeeper> {

    /**
     * 动态条件分页查询
     * @param page
     * @param housekeeper
     * @return
     */
    Page<Housekeeper> selectPage(IPage<Housekeeper> page, @Param("params") Housekeeper housekeeper);

    /**
     * 家政人员匹配
     * @param demand
     * @return
     */
    List<Housekeeper> demandMatch(@Param("params") Demand demand);

    /**
     * 最近七日每日新增家政员数
     * @param companyId
     * @return
     */
    List<SelectResult> sevenDayNewUser(@Param("companyId") Integer companyId);


}
